
package com.efast.dmom.aps.dao;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.efast.dmom.aps.bean.PlanOrderAdjust;
import com.efast.dmom.aps.bean.PlanOrderAdjustQueryCondition;
import com.efast.dmom.aps.dao.base.BaseDao;
import com.efast.dmom.aps.entity.PlanOrderEntity;

public interface PlanOrderDao extends BaseDao<PlanOrderEntity>{

	List<PlanOrderEntity> getUnbroadcastPlanOrders(long prodLineId);
	
	List<PlanOrderEntity> getUnbroadcastAndUnFreezePlanOrders();
	
	PlanOrderEntity getByOrderNo(String orderNo);
	
	PlanOrderEntity setPlantShopId(PlanOrderEntity orderEntity);
	
	void updatePlanOrder(List<PlanOrderEntity> list);

	List<PlanOrderAdjust> getDataByPlanOrderAdjust(PlanOrderAdjustQueryCondition planOrderAdjustQueryCondition);
	List<PlanOrderEntity> getByLineAndTime(@Param("lineId")long lineId,@Param("startTime")LocalDateTime startTime,@Param("endTime")LocalDateTime endTime);
	PlanOrderEntity getMiddlePlanOrderByLineAndTime(@Param("lineId")long lineId,@Param("time")LocalDateTime time);
}
